package com.lagou.concurrent.demo;

public class Data {

    private float myFloat;

    public void modify(float difference) {
        float value = this.myFloat;
        System.out.println(Thread.currentThread().getName() + " before - " + value);
        this.myFloat = value + difference;
        System.out.println(Thread.currentThread().getName() + " - after " + myFloat);
    }

}